{extend name="admin@index_layout"/}
{block name="main"}

<div class="layui-card">
    <div class="layui-card-header">第三方存储管理</div>
    <div class="layui-card-body">

        <table class="layui-hide" id="table"></table>
    </div>

    <div class="layui-form">
        <script type="text/html" id="barTool">
            <a href='{:url("edit")}?id={{ d.id }}' class="layui-btn layui-btn-xs">设置</a>
        </script>
    </div>
</div>


{/block}
{block name="layui"}{/block}
{block name="script"}
<script>
    layui.use(['form', 'table'], function () {
        var $ = layui.$,
            table = layui.table,
            form = layui.form,
            layer = layui.layer;

        table.render({
            elem: '#table',
            toolbar: '#toolbarDemo',
            url: "{:url('ThirdOss/index',['isadmin'=>1])}",
            cellMinWidth: 80,
            cols: [[
                {field: 'id', align: 'center', width: 80, title: 'ID'},
                {field: 'key', width: 180, title: '上传驱动键', align: "center"},
                {field: 'value', width: 180, title: '上传驱动值', align: "center"},
                {
                    field: 'status',
                    title: '状态',
                    width: 120,
                    align: "center",
                    templet: "<div>{{ d.status==1 ? '已设置' : '未设置' }}</div>"
                },
                {fixed: 'right', align: 'center', width: 200, title: '操作', toolbar: '#barTool'}
            ]]
        });
    });
</script>
{/block}